package zhousi;
import java.util.Scanner;
public class Pets extends Sizhou{
    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Pets(){
        super("楠楠","公",100,0);
    }
    //如果子类重写了父类的方法，那么在子类中调用的方法，就是子类自己
public static void main(String[] args){
        Pets sizhou=new Pets("Q仔");
        sizhou.print();
}
public Pets(String type){
        super("楠楠","公",100,0);
        this.type=type;
}
    @Override
    public void print() {
        super.print();
        System.out.println("我的性别是"+type);
    }


    public Pets(String name, String sex, int health, int  like) {
        super(name, sex, health, like);
    }
}



